// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import axios from 'axios'
//导入组件
// import vant from 'vant'
// //导入组件样式
// import 'vant/lib/index.css'
// 使用babel-plugin-import 插件实现按需导入
import {Icon,Button,NavBar,Search,Lazyload,CellGroup,Cell,Row,Col, Tabbar, TabbarItem, Toast, Tag, List, Dialog} from "vant";

Vue.use(Icon).use(Button).use(NavBar).use(Search).use(Lazyload).use(CellGroup).use(Cell).use(Row).use(Col).use(Tabbar).use(TabbarItem).use(Toast).use(Tag).use(List).use(Dialog);
// Vue.prototype.$axios = axios;
Vue.prototype.$axios = axios;
Vue.config.productionTip = false

//定义全局过滤器
Vue.filter('toFixed',(target,val=2)=>{
  return parseFloat(target).toFixed(val)
})

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: {App},
  template: '<App/>'
})
let w = document.documentElement.clientWidth || document.body.clientWidth;
document.documentElement.style.fontSize = w / 640 * 100 + 'px';
